package edu.put.sk.nrpp;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class NetworkMask {

	private Bit[] NetworkIP;
	public NetworkMask(Bit[] ip, Bit[] mask){
		this.NetworkIP=new Bit[32];
		for (int i=0;i<32;i++){
			NetworkIP[i]=new Bit(ip[i].getValue()*mask[i].getValue());
		}
	}
	
	public InetAddress getSite() throws UnknownHostException{
		return Bit.toInetAddres(NetworkIP);
	}
}
